import { get, post } from '@/request/useRequest'
import { GridParams, ResponseBody } from '@/api/typing';
import {Department} from "@/api/system/core/typing";

export async function list(params: GridParams): Promise<ResponseBody> {
  return get('user/list', params);
}
export async function list3(params: GridParams): Promise<ResponseBody> {
  return get('user/list3', params);
}
export async function exists(params: object): Promise<ResponseBody> {
  return get('user/exists', params);
}
export async function upsert(params: object): Promise<ResponseBody> {
  return post('user/upsert', params);
}
export async function deletes(params: []): Promise<ResponseBody> {
  return post('user/deletes', params);
}
export async function selectAllAndFactoryList(): Promise<ResponseBody> {
  return get('user/selectAllAndFactoryList');
}
export async function selectAll(): Promise<ResponseBody<Department>> {
    return get('user/alluser');
}